using System;
using StructureMap;
using System.Diagnostics;

namespace Impact.Infrastructure.Logging
{
    /// <summary>
    /// Static methods for ILogger interface
    /// </summary>
    public static class Logger
    {

        /// <summary>
        /// Writes an exception to the log
        /// </summary>
        public static void Write( Exception ex )
        {
            ILogger logger = ObjectFactory.GetInstance<ILogger>();
            logger.Write( ex );
        }

        /// <summary>
        /// Writes a message to the log
        /// </summary>
        public static void Write( string message )
        {
            ILogger logger = ObjectFactory.GetInstance<ILogger>();
            logger.Write( message );
        }

        /// <summary>
        /// Writes a message with a severity to the log
        /// </summary>
        public static void Write( string message, TraceEventType severity )
        {
            ILogger logger = ObjectFactory.GetInstance<ILogger>();
            logger.Write( message, severity );
        }

    }
}
